package com.tianyi.lib.bo.menu;

import java.util.ArrayList;
import java.util.List;

/**
 * top menu bo
 *
 * @author cuixuhui
 * @date 2019/11/26
 */
public class TopMenuBo {

    private String key;

    private String title;

    private String link;

    private List<TopMenuBo> children;

    public void addChildren(TopMenuBo child){
        if (this.children == null){
            this.children = new ArrayList<>();
        }
        this.children.add(child);
    }

    public String getKey() {
        return key;
    }

    public void setKey(String key) {
        this.key = key;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getLink() {
        return link;
    }

    public void setLink(String link) {
        this.link = link;
    }

    public List<TopMenuBo> getChildren() {
        return children;
    }

    public void setChildren(List<TopMenuBo> children) {
        this.children = children;
    }
}
